package com.example.demo.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("product")
@Api(tags = "商品服务接口")
@RestController
public class ProductController {

    @GetMapping("findAll")
    @ApiOperation(value = "查询所有商品信息")
    @ApiResponses({
            @ApiResponse(code = 404, message = "页面不存在")
    })
    public Map<String,Object> findAll(){
        HashMap<String, Object> map = new HashMap<>();
        map.put("success","查询成功");
        map.put("state",200);
        return map;
    }
}
